<?php

namespace Application\Services;

use BlogServices\ArticleServiceIf;

class ArticleService extends BaseService implements ArticleServiceIf
{
    /**
     * 定义服务名称
     * @return string
     */
    public function setServiceName()
    {
        return "ArticleService";
    }

    /**
     * @param $where string 条件
     * @param $offset integer 偏移量
     * @param $limit integer 读取条数
     * @return []BlogServices\Article\Article
     */
    public function GetArticles($where, $offset, $limit)
    {
        return $this->service->GetArticles($where, $offset, $limit);
    }

    public function GetArticleById($id)
    {
        return $this->service->GetArticleById($id);
    }

    /**
     * @param int $catid
     * @param int $offset
     * @param int $limit
     * @return \BlogServices\Article[]
     */
    public function GetArticlesByCatId($catid, $offset, $limit)
    {
        // TODO: Implement GetArticlesByCatId() method.
    }

    /**
     * @param string $where
     * @return int
     */
    public function GetArticleTotal($where)
    {
        return $this->service->GetArticleTotal($where);
    }
}